<?php
/**
 * Created by PhpStorm.
 * User: zyark
 * Date: 2017/8/30
 * Time: 13:17
 */

namespace Home\Logic;


class ApplyLogic
{
    /**
     * 添加到报名记录
     * @param $race_id int 赛事id
     * @param $user_id int 用户id
     * @param $integral int 钻石数目
     * @param $model object
     */
    public function add($race_id,$user_id,$integral,$model){
        $log['race_id'] = $race_id;
        $log['user_id'] = $user_id;
        $log['integral'] = $integral;
        $log['create_time'] = time();
        $model->table('t_apply_log')->add($log);
    }
}